package com.voute.Api;

import com.voute.Model.Bean.BaseBean;
import com.voute.Model.Bean.CircleDetailsInfoBean;
import com.voute.Model.Bean.DiscoveryBean;
import com.voute.Model.Bean.SimpleCircleInfoBean;

import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by xianke on 22/04/2017.
 */

public interface CircleInfoService {

    @GET("v1/users/self/circles")
    Observable<SimpleCircleInfoBean> requestCircles(@Query("page") String page);

    @GET("/v1/circles/{hash}/latest")
    Observable<DiscoveryBean> requestCircleDetails(@Path("hash") String hash_circle, @Query("anchor") String anchor);

    @GET("v1/circles/{hash}")
    Observable<CircleDetailsInfoBean> requestCircleBaseInfo(@Path("hash") String hash_circle);

    @FormUrlEncoded
    @POST("v1/users/self/circles")
    Observable<BaseBean> JoinCircle(@Field("hash") String hash_circle);

    @DELETE("v1/users/self/circles/{hash}")
    Observable<BaseBean> ExitCircle(@Path("hash") String hash_circle);
}
